package com.page.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.page.entity.Car;
import com.page.model.CarCriteria;
import com.page.service.CarService;
import com.ucar.common.utils.page.jpa.PageImpl;
import com.ucar.common.utils.page.jpa.model.PagingConditions;

import io.swagger.annotations.ApiOperation;

@RestController
public class CarController {

	@Autowired
	private CarService carservice;
	
	@GetMapping("/page")
	@ApiOperation(value="分页条件查询")
	public PageImpl<Car> findCarInfos(CarCriteria carCriteria, @Validated PagingConditions paging){
		
		return carservice.findCarInfosByPage(carCriteria,paging);
	}
}
